package com.example.demoeventspring.service.impl;

import com.example.demoeventspring.event.LoginNotifyEvent;
import com.example.demoeventspring.event.RegisterNotifyEvent;
import com.example.demoeventspring.service.EventService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


/**
 * 实际事件处理
 */
@Slf4j
@Service
public class EventServiceImpl implements EventService {

    /**
     * 注册通知
     *
     * @param event
     */
    @Override
    public void RegisterNotifyEvent(RegisterNotifyEvent event) {
        log.info("RegisterNotifyEvent: 模拟具体的业务逻辑处理过程， 这里单纯地打印出来即可");
        log.info("RegisterNotifyEvent:{}", event);
    }

    /**
     * 登录通知
     *
     * @param event
     */
    @Override
    public void LoginNotifyEvent(LoginNotifyEvent event) {
        log.info("LoginNotifyEvent: 模拟具体的业务逻辑处理过程， 这里单纯地打印出来即可");
        log.info("LoginNotifyEvent:{}", event);
    }
}
